<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<!--<script src="./index.js"></script>-->
<script>
	// then接收的回调函数是异步执行的。
	const p = new Promise(function(resolve,reject){
		// resolve(1);
		reject(2);
	});
	p.then(function(value){
		console.log("成功回调",value);
	},function(reason){
		console.log("失败回调",reason);
	});
	console.log("over");
</script>

</html>